package com.csweimei.rentmanagementtreasure.tenant.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import com.chad.library.BR;
import com.csweimei.rentmanagementtreasure.R;
import com.csweimei.rentmanagementtreasure.base.AppViewModelFactory;
import com.csweimei.rentmanagementtreasure.databinding.LayoutFFourBinding;
import com.csweimei.rentmanagementtreasure.tenant.viewModel.FFourVM;

import me.goldze.mvvmhabit.base.BaseFragment;

public class TabFourFragment extends BaseFragment<LayoutFFourBinding, FFourVM> {
    @Override
    public int initContentView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return R.layout.layout_f_four;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initData() {
        super.initData();
        viewModel.setActivity(getActivity());
    }

    @Override
    public FFourVM initViewModel() {
        AppViewModelFactory viewModelFactory = AppViewModelFactory.getInstance(getActivity().getApplication());
        return ViewModelProviders.of(this,viewModelFactory).get(FFourVM.class);
    }
}
